<template>
    <div id="app">
        <mt-header fixed title="固定在顶部"></mt-header>
        <transition name="fade">
            <router-view/>
        </transition>
        <nav class="mui-bar mui-bar-tab">
            <router-link class="mui-tab-item" active-class="mui-active" to="/home">
                <span class="mui-icon mui-icon-home"></span>
                <span class="mui-tab-label">首页</span>
            </router-link>
            <router-link class="mui-tab-item" active-class="mui-active" to="/member">
                <span class="mui-icon mui-icon-contact"></span>
                <span class="mui-tab-label">会员</span>
            </router-link>
            <router-link class="mui-tab-item" active-class="mui-active" to="/shopcar">
                <span class="mui-icon mui-icon-extra mui-icon-extra-cart">
                    <span class="mui-badge">0</span>
                </span>
                <span class="mui-tab-label">购物车</span>
            </router-link>
            <router-link class="mui-tab-item" active-class="mui-active" to="/search">
                <span class="mui-icon mui-icon-search"></span>
                <span class="mui-tab-label">搜索</span>
            </router-link>
        </nav>
    </div>
</template> 

<script>
export default {
    data() {
        return {};
    },
    methods: {
        show() {
            Toast({
                message: "operation success",
                iconClass: "glyphicon glyphicon-plus"
            });
        }
    }
};
</script>

<style lang="scss" scoped>
#app {
    font-family: "Avenir", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 40px;
    overflow-x: hidden;
}
.fade-enter-active,
.fade-leave-active {
    transition:all .5s;
    transform: translateX(0px);
    
}
.fade-enter {
    transform: translateX(100%);
}
.fade-leave-to {
    transform: translateX(-100%);
    position: absolute;
}
</style>
